const TOKEN_KEY = 'geek-pc'

// 获取token
const getToken = () => localStorage.getItem(TOKEN_KEY)

// 存储token
const saveToken = token => localStorage.setItem(TOKEN_KEY, token)

// 清除token
const clearToken = () => localStorage.removeItem(TOKEN_KEY)

// 是否登录
const isAuth = () => !!getToken()

export { isAuth, getToken, saveToken, clearToken }